<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var age = 19;
    // if (age >= 18) {
    //     console.log('可以投票');
    // } else {
    //     console.log('不可以投票');
    // }

    age >= 18? console.log('可以投票') : console.log('不可以投票');

    var score = 59;
    if (score >= 90) {
        console.log('优秀');
    }else if (score >= 80){
        console.log('良好');
    }else if (score >= 60){
        console.log('及格');
    }else {
        console.log('不及格');
    }
</script>
</body>
</html>
